package com.eregg.learn.io;

import java.net.Socket;
import java.util.Date;

public class IOClient {
    public static void main(String[] args)throws Exception {
        Socket socket = new Socket("localhost", 8000);

        while (true){
            socket.getOutputStream().write((Thread.currentThread().getName() +":"+new Date()+"Hello World!!!").getBytes());
            Thread.sleep(2000l);
        }
    }
}
